第 4 步:我们需要另一个 if 语句来测试玩家是否选择纸。

  • 点击逻辑,然后.将if拖到代码的底部。 (它应该是无缩进的!)
  • 测试值"yes"更改为"paper"
  • 点击图形,然后.将缩进的Paper拖到新的 if 语句下。

if 语句必须不缩进。如果第一个条件为假,则程序跳到下一个未缩进的代码。

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)